package com.keboom.show.common.api;

public enum ResultCode implements IErrorCode {
    SUCCESS(200, "请求成功"),
    CREATED(201,"创建成功"),
    DELETED(204,"删除成功"),
    BADREQUEST(400,"请求的地址不存在或者包含不支持的参数"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    NOTFOUND(404, "请求的资源不存在"),
    FAILED(500, "操作失败");
    private long code;
    private String message;

    private ResultCode(long code, String message){
        this.code = code;
        this.message = message;
    }

    @Override
    public long getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
